package com.hmh;

import com.hmh.DAO.Mappers.AuthorMapper;
import com.hmh.DAO.Mappers.BlogMapper;
import com.hmh.DAO.Mappers.PostMapper;
import com.hmh.DAO.SQLSessionFactory;
import com.hmh.Entities.Author;
import com.hmh.Entities.Blog;
import com.hmh.Entities.Post;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        BlogMapper blogMapper = SQLSessionFactory.getSqlSession().getMapper(BlogMapper.class);
        Blog blog = blogMapper.selectBlogByIdHungry(1);
        System.out.println(blog);
//        PostMapper postMapper = SQLSessionFactory.getSqlSession().getMapper(PostMapper.class);
//        List<Post> posts = postMapper.selectPostsByBid(1);
//        for (Post post :
//                posts) {
//            System.out.println(post);
//        }
    }
}
